<?php
class FilesFunction{

	/**
	 * This is function create folder with url
	 * @path: url would create
	 * @mode: persmission folder
	 * @return true if success else faild
	 */
	function recursive_mkdir($path, $mode = 0777) {
		$dirs = explode(DIRECTORY_SEPARATOR , $path);
		$count = count($dirs);
		$path = '.';
		for ($i = 0; $i < $count; ++$i) {
			$path .= DIRECTORY_SEPARATOR . $dirs[$i];
			if (!is_dir($path) && !mkdir($path, $mode)) {
				return false;
			}
		}
		return true;
	}

}